package config

import (
	viper2 "github.com/spf13/viper"
)

var viper *viper2.Viper

func init() {

	viper = viper2.New()
	viper.SetConfigName("application")
	viper.SetConfigType("yaml")
	viper.AddConfigPath("config")

	if err := viper.ReadInConfig(); err != nil {
		panic(err.Error())
	}
}

func GetString(key string) (value string) {
	return viper.GetString(key)
}
func GetInt(key string) (value int) {
	return viper.Get(key).(int)
}
func GetBool(key string) (value bool) {
	return viper.Get(key).(bool)
}
